home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / less.1 < prev    next >
Text File  |  1995-07-25  |  41KB  |  936 lines

  1.  
  2.  
  3.  
  4.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           less - opposite of more
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           lllleeeessssssss ----????
  13.           lllleeeessssssss [[[[----[[[[++++]]]]aaaaBBBBccccCCCCddddeeeeEEEEffffHHHHiiiimmmmMMMMnnnnNNNNqqqqQQQQrrrrssssSSSSuuuuUUUUwwww]]]]
  14.                [[[[----bbbb _b_u_f_s]]]] [[[[----hhhh _l_i_n_e_s]]]] [[[[----jjjj _l_i_n_e]]]] [[[[----kkkk _k_e_y_f_i_l_e]]]]
  15.                [[[[----{{{{ooooOOOO}}}} _l_o_g_f_i_l_e]]]] [[[[----pppp _p_a_t_t_e_r_n]]]] [[[[----PPPP _p_r_o_m_p_t]]]] [[[[----tttt _t_a_g]]]]
  16.                [[[[----TTTT _t_a_g_f_i_l_e]]]] [[[[----xxxx _t_a_b]]]] [[[[----yyyy _l_i_n_e_s]]]] [[[[----[[[[zzzz]]]] _l_i_n_e_s]]]]
  17.                [[[[++++[[[[++++]]]]_c_m_d]]]] [[[[_f_i_l_e_n_a_m_e]]]]............
  18.  
  19.  
  20.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.           _L_e_s_s is a program similar to _m_o_r_e (1), but which allows
  22.           backward movement in the file as well as forward movement.
  23.           Also, _l_e_s_s does not have to read the entire input file
  24.           before starting, so with large input files it starts up
  25.           faster than text editors like _v_i (1).  _L_e_s_s uses termcap (or
  26.           terminfo on some systems), so it can run on a variety of
  27.           terminals.  There is even limited support for hardcopy
  28.           terminals.  (On a hardcopy terminal, lines which should be
  29.           printed at the top of the screen are prefixed with an up-
  30.           arrow.)
  31.  
  32.           Commands are based on both _m_o_r_e and _v_i. Commands may be
  33.           preceded by a decimal number, called N in the descriptions
  34.           below.  The number is used by some commands, as indicated.
  35.  
  36.  
  37.      CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  38.           In the following descriptions, ^X means control-X.  ESC
  39.           stands for the ESCAPE key; for example ESC-v means the two
  40.           character sequence "ESCAPE", then "v".
  41.  
  42.           h or H
  43.                Help: display a summary of these commands.  If you
  44.                forget all the other commands, remember this one.
  45.  
  46.           SPACE or ^V or f or ^F
  47.                Scroll forward N lines, default one window (see option
  48.                -z below).  If N is more than the screen size, only the
  49.                final screenful is displayed.  Warning: some systems
  50.                use ^V as a special literalization character.
  51.  
  52.           z    Like SPACE, but if N is specified, it becomes the new
  53.                window size.
  54.  
  55.           RETURN or ^N or e or ^E or j or ^J
  56.                Scroll forward N lines, default 1.  The entire N lines
  57.                are displayed, even if N is more than the screen size.
  58.  
  59.           d or ^D
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 3/9/94)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  71.  
  72.  
  73.  
  74.                Scroll forward N lines, default one half of the screen
  75.                size.  If N is specified, it becomes the new default
  76.                for subsequent d and u commands.
  77.  
  78.           b or ^B or ESC-v
  79.                Scroll backward N lines, default one window (see option
  80.                -z below).  If N is more than the screen size, only the
  81.                final screenful is displayed.
  82.  
  83.           w    Like ESC-v, but if N is specified, it becomes the new
  84.                window size.
  85.  
  86.           y or ^Y or ^P or k or ^K
  87.                Scroll backward N lines, default 1.  The entire N lines
  88.                are displayed, even if N is more than the screen size.
  89.                Warning: some systems use ^Y as a special job control
  90.                character.
  91.  
  92.           u or ^U
  93.                Scroll backward N lines, default one half of the screen
  94.                size.  If N is specified, it becomes the new default
  95.                for subsequent d and u commands.
  96.  
  97.           r or ^R or ^L
  98.                Repaint the screen.
  99.  
  100.           R    Repaint the screen, discarding any buffered input.
  101.                Useful if the file is changing while it is being
  102.                viewed.
  103.  
  104.           F    Scroll forward, and keep trying to read when the end of
  105.                file is reached.  Normally this command would be used
  106.                when already at the end of the file.  It is a way to
  107.                monitor the tail of a file which is growing while it is
  108.                being viewed.  (The behavior is similar to the "tail
  109.                -f" command.)
  110.  
  111.           g or < or ESC-<
  112.                Go to line N in the file, default 1 (beginning of
  113.                file).  (Warning: this may be slow if N is large.)
  114.  
  115.           G or > or ESC->
  116.                Go to line N in the file, default the end of the file.
  117.                (Warning: this may be slow if N is large, or if N is
  118.                not specified and standard input, rather than a file,
  119.                is being read.)
  120.  
  121.           p or %
  122.                Go to a position N percent into the file.  N should be
  123.                between 0 and 100.  (This works if standard input is
  124.                being read, but only if _l_e_s_s has already read to the
  125.                end of the file.  It is always fast, but not always
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 3/9/94)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  137.  
  138.  
  139.  
  140.                useful.)
  141.  
  142.           {    If a left curly bracket appears in the top line
  143.                displayed on the screen, the { command will go to the
  144.                matching right curly bracket.  The matching right curly
  145.                bracket is positioned on the bottom line of the screen.
  146.                If there is more than one left curly bracket on the top
  147.                line, a number N may be used to specify the N-th
  148.                bracket on the line.
  149.  
  150.           }    If a right curly bracket appears in the bottom line
  151.                displayed on the screen, the } command will go to the
  152.                matching left curly bracket.  The matching left curly
  153.                bracket is positioned on the top line of the screen.
  154.                If there is more than one right curly bracket on the
  155.                top line, a number N may be used to specify the N-th
  156.                bracket on the line.
  157.  
  158.           (    Like {, but applies to parentheses rather than curly
  159.                brackets.
  160.  
  161.           )    Like }, but applies to parentheses rather than curly
  162.                brackets.
  163.  
  164.           [    Like {, but applies to square brackets rather than
  165.                curly brackets.
  166.  
  167.           ]    Like }, but applies to square brackets rather than
  168.                curly brackets.
  169.  
  170.           ESC-^F
  171.                Followed by two characters, acts like {, but uses the
  172.                two characters as open and close brackets,
  173.                respectively.  For example, "ESC ^F < >" could be used
  174.                to go forward to the > which matches the < in the top
  175.                displayed line.
  176.  
  177.           ESC-^B
  178.                Followed by two characters, acts like }, but uses the
  179.                two characters as open and close brackets,
  180.                respectively.  For example, "ESC ^B < >" could be used
  181.                to go backward to the < which matches the > in the
  182.                bottom displayed line.
  183.  
  184.           m    Followed by any lowercase letter, marks the current
  185.                position with that letter.
  186.  
  187.           '    (Single quote.) Followed by any lowercase letter,
  188.                returns to the position which was previously marked
  189.                with that letter.  Followed by another single quote,
  190.                returns to the position at which the last "large"
  191.                movement command was executed.  Followed by a ^ or $,
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 3/9/94)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  203.  
  204.  
  205.  
  206.                jumps to the beginning or end of the file respectively.
  207.                Marks are preserved when a new file is examined, so the
  208.                ' command can be used to switch between input files.
  209.  
  210.           ^X^X Same as single quote.
  211.  
  212.           /pattern
  213.                Search forward in the file for the N-th line containing
  214.                the pattern.  N defaults to 1.  The pattern is a
  215.                regular expression, as recognized by _e_d. The search
  216.                starts at the second line displayed (but see the -a and
  217.                -j options, which change this).
  218.  
  219.                Certain characters are special if entered at the
  220.                beginning of the pattern; they modify the type of
  221.                search rather than become part of the pattern:
  222.  
  223.                !    Search for lines which do NOT match the pattern.
  224.  
  225.                *    Search multiple files.  That is, if the search
  226.                     reaches the end of the current file without
  227.                     finding a match, the search continues in the next
  228.                     file in the command line list.
  229.  
  230.                @    Begin the search at the first line of the first
  231.                     file in the command line list, regardless of what
  232.                     is currently displayed on the screen or the
  233.                     settings of the -a or -j options.
  234.  
  235.           ?pattern
  236.                Search backward in the file for the N-th line
  237.                containing the pattern.  The search starts at the line
  238.                immediately before the top line displayed.
  239.  
  240.                Certain characters are special as in the / command:
  241.  
  242.                !    Search for lines which do NOT match the pattern.
  243.  
  244.                *    Search multiple files.  That is, if the search
  245.                     reaches the beginning of the current file without
  246.                     finding a match, the search continues in the
  247.                     previous file in the command line list.
  248.  
  249.                @    Begin the search at the last line of the last file
  250.                     in the command line list, regardless of what is
  251.                     currently displayed on the screen or the settings
  252.                     of the -a or -j options.
  253.  
  254.           ESC-/pattern
  255.                Same as "/*".
  256.  
  257.           ESC-?pattern
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 3/9/94)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  269.  
  270.  
  271.  
  272.                Same as "?*".
  273.  
  274.           n    Repeat previous search, for N-th line containing the
  275.                last pattern.  If the previous search was modified by
  276.                !, the search is made for the N-th line NOT containing
  277.                the pattern.  If the previous search was modified by *,
  278.                the search continues in the next (or previous) file if
  279.                not satisfied in the current file.  There is no effect
  280.                if the previous search was modified by @.
  281.  
  282.           N    Repeat previous search, but in the reverse direction.
  283.  
  284.           ESC-n
  285.                Repeat previous search, but crossing file boundaries.
  286.                The effect is as if the previous search were modified
  287.                by *.
  288.  
  289.           ESC-N
  290.                Repeat previous search, but in the reverse direction
  291.                and crossing file boundaries.
  292.  
  293.           :e [filename]
  294.                Examine a new file.  If the filename is missing, the
  295.                "current" file (see the :n and :p commands below) from
  296.                the list of files in the command line is re-examined.
  297.                A percent sign (%) in the filename is replaced by the
  298.                name of the current file. A pound sign (#) is replaced
  299.                by the name of the previously examined file.  The
  300.                filename is inserted into the command line list of
  301.                files so that it can be seen by subsequent :n and :p
  302.                commands.  If the filename consists of several files,
  303.                they are all inserted into the list of files and the
  304.                first one is examined.
  305.  
  306.           ^X^V or E
  307.                Same as :e.  Warning: some systems use ^V as a special
  308.                literalization character.
  309.  
  310.           :n   Examine the next file (from the list of files given in
  311.                the command line).  If a number N is specified, the N-
  312.                th next file is examined.
  313.  
  314.           :p   Examine the previous file in the command line list.  If
  315.                a number N is specified, the N-th previous file is
  316.                examined.
  317.  
  318.           :x   Examine the first file in the command line list.  If a
  319.                number N is specified, the N-th file in the list is
  320.                examined.
  321.  
  322.           = or ^G or :f
  323.                Prints some information about the file being viewed,
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 3/9/94)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  335.  
  336.  
  337.  
  338.                including its name and the line number and byte offset
  339.                of the bottom line being displayed.  If possible, it
  340.                also prints the length of the file, the number of lines
  341.                in the file and the percent of the file above the last
  342.                displayed line.
  343.  
  344.           -    Followed by one of the command line option letters (see
  345.                below), this will change the setting of that option and
  346.                print a message describing the new setting.  If the
  347.                option letter has a numeric value (such as -b or -h),
  348.                or a string value (such as -P or -t), a new value may
  349.                be entered after the option letter.  If no new value is
  350.                entered, a message describing the current setting is
  351.                printed and nothing is changed.
  352.  
  353.           -+   Followed by one of the command line option letters (see
  354.                below), this will reset the option to its default
  355.                setting and print a message describing the new setting.
  356.                (The "-+_X" command does the same thing as "-+_X" on the
  357.                command line.) This does not work for string-valued
  358.                options.
  359.  
  360.           --   Followed by one of the command line option letters (see
  361.                below), this will reset the option to the "opposite" of
  362.                its default setting and print a message describing the
  363.                new setting.  (The "--_X" command does the same thing as
  364.                "-_X" on the command line.) This does not work for
  365.                numeric or string-valued options.
  366.  
  367.           _    (Underscore.) Followed by one of the command line
  368.                option letters (see below), this will print a message
  369.                describing the current setting of that option.  The
  370.                setting of the option is not changed.
  371.  
  372.           +cmd Causes the specified cmd to be executed each time a new
  373.                file is examined.  For example, +G causes _l_e_s_s to
  374.                initially display each file starting at the end rather
  375.                than the beginning.
  376.  
  377.           V    Prints the version number of _l_e_s_s being run.
  378.  
  379.           q or :q or :Q or ZZ or ESC ESC
  380.                Exits _l_e_s_s.
  381.  
  382.           The following three commands may or may not be valid,
  383.           depending on your particular installation.
  384.  
  385.           v    Invokes an editor to edit the current file being
  386.                viewed.  The editor is taken from the environment
  387.                variable EDITOR, or defaults to "vi".  See also the
  388.                discussion of LESSEDIT under the section on PROMPTS
  389.                below.
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 3/9/94)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  401.  
  402.  
  403.  
  404.           ! shell-command
  405.                Invokes a shell to run the shell-command given.  A
  406.                percent sign (%) in the command is replaced by the name
  407.                of the current file. A pound sign (#) is replaced by
  408.                the name of the previously examined file.  "!!" repeats
  409.                the last shell command.  "!" with no shell command
  410.                simply invokes a shell.  In all cases, the shell is
  411.                taken from the environment variable SHELL, or defaults
  412.                to "sh".
  413.  
  414.           | <m> shell-command
  415.                <m> represents any mark letter.  Pipes a section of the
  416.                input file to the given shell command.  The section of
  417.                the file to be piped is between the first line on the
  418.                current screen and the position marked by the letter.
  419.                <m> may also be ^ or $ to indicate beginning or end of
  420.                file respectively.  If <m> is . or newline, the current
  421.                screen is piped.
  422.  
  423.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  424.           Command line options are described below.  Most options may
  425.           be changed while _l_e_s_s is running, via the "-" command.
  426.  
  427.           Options are also taken from the environment variable "LESS".
  428.           For example, to avoid typing "less -options ..." each time
  429.           _l_e_s_s is invoked, you might tell _c_s_h:
  430.  
  431.           setenv LESS "-options"
  432.  
  433.           or if you use _s_h:
  434.  
  435.           LESS="-options"; export LESS
  436.  
  437.           The environment variable is parsed before the command line,
  438.           so command line options override the LESS environment
  439.           variable.  If an option appears in the LESS variable, it can
  440.           be reset to its default on the command line by beginning the
  441.           command line option with "-+".
  442.  
  443.           A dollar sign ($) may be used to signal the end of an option
  444.           string.  This is important only for options like -P which
  445.           take a following string.
  446.  
  447.           -?   This option displays a summary of the commands accepted
  448.                by _l_e_s_s (the same as the h command).  If this option is
  449.                given, all other options are ignored, and _l_e_s_s exits
  450.                after the help screen is viewed.  (Depending on how
  451.                your shell interprets the question mark, it may be
  452.                necessary to quote the question mark, thus: "-\?".)
  453.  
  454.           -a   Causes searches to start after the last line displayed
  455.                on the screen, thus skipping all lines displayed on the
  456.  
  457.  
  458.  
  459.      Page 7                                           (printed 3/9/94)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  467.  
  468.  
  469.  
  470.                screen.  By default, searches start at the second line
  471.                on the screen (or after the last found line; see the -j
  472.                option).
  473.  
  474.           -b_n  Causes _l_e_s_s to use a non-standard number of buffers.
  475.                Buffers are 1K, and by default 10 buffers are used
  476.                (except if data in coming from standard input; see the
  477.                -B option).  The number _n specifies a different number
  478.                of buffers to use.
  479.  
  480.           -B   Disables automatic allocation of buffers, so that only
  481.                the default number of buffers are used.  If more data
  482.                is read than will fit in the buffers, the oldest data
  483.                is discarded.  By default, when data is coming from
  484.                standard input, buffers are allocated automatically as
  485.                needed to avoid loss of data.
  486.  
  487.           -c   Causes full screen repaints to be painted from the top
  488.                line down.  By default, full screen repaints are done
  489.                by scrolling from the bottom of the screen.
  490.  
  491.           -C   The -C option is like -c, but the screen is cleared
  492.                before it is repainted.
  493.  
  494.           -d   The -d option suppresses the error message normally
  495.                displayed if the terminal is dumb; that is, lacks some
  496.                important capability, such as the ability to clear the
  497.                screen or scroll backward.  The -d option does not
  498.                otherwise change the behavior of _l_e_s_s on a dumb
  499.                terminal).
  500.  
  501.           -e   Causes _l_e_s_s to automatically exit the second time it
  502.                reaches end-of-file.  By default, the only way to exit
  503.                _l_e_s_s is via the "q" command.
  504.  
  505.           -E   Causes _l_e_s_s to automatically exit the first time it
  506.                reaches end-of-file.
  507.  
  508.           -f   Forces non-regular files to be opened.  (A non-regular
  509.                file is a directory or a device special file.) Also
  510.                suppresses the warning message when a binary file is
  511.                opened.  By default, _l_e_s_s will refuse to open non-
  512.                regular files.
  513.  
  514.           -h_n  Specifies a maximum number of lines to scroll backward.
  515.                If it is necessary to scroll backward more than _n
  516.                lines, the screen is repainted in a forward direction
  517.                instead.  (If the terminal does not have the ability to
  518.                scroll backward, -h0 is implied.)
  519.  
  520.           -i   Causes searches to ignore case; that is, uppercase and
  521.                lowercase are considered identical.  Also, text which
  522.  
  523.  
  524.  
  525.      Page 8                                           (printed 3/9/94)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  533.  
  534.  
  535.  
  536.                is overstruck or underlined can be searched for.  This
  537.                option is ignored if any uppercase letters appear in
  538.                the search pattern.
  539.  
  540.           -j_n  Specifies a line on the screen where "target" lines are
  541.                to be positioned.  Target lines are the object of text
  542.                searches, tag searches, jumps to a line number, jumps
  543.                to a file percentage, and jumps to a marked position.
  544.                The screen line is specified by a number: the top line
  545.                on the screen is 1, the next is 2, and so on.  The
  546.                number may be negative to specify a line relative to
  547.                the bottom of the screen: the bottom line on the screen
  548.                is -1, the second to the bottom is -2, and so on.  If
  549.                the -j option is used, searches begin at the line
  550.                immediately after the target line.  For example, if "-
  551.                j4" is used, the target line is the fourth line on the
  552.                screen, so searches begin at the fifth line on the
  553.                screen.
  554.  
  555.           -k_f_i_l_e_n_a_m_e
  556.                Causes _l_e_s_s to open and interpret the named file as a
  557.                _l_e_s_s_k_e_y (1) file.  Multiple -k options may be
  558.                specified.  If a file called .less exists in the user's
  559.                home directory, this file is also used as a _l_e_s_s_k_e_y
  560.                file.
  561.  
  562.           -m   Causes _l_e_s_s to prompt verbosely (like _m_o_r_e), with the
  563.                percent into the file.  By default, _l_e_s_s prompts with a
  564.                colon.
  565.  
  566.           -M   Causes _l_e_s_s to prompt even more verbosely than _m_o_r_e.
  567.  
  568.           -n   Suppresses line numbers.  The default (to use line
  569.                numbers) may cause _l_e_s_s to run more slowly in some
  570.                cases, especially with a very large input file.
  571.                Suppressing line numbers with the -n flag will avoid
  572.                this problem.  Using line numbers means: the line
  573.                number will be displayed in the verbose prompt and in
  574.                the = command, and the v command will pass the current
  575.                line number to the editor (see also the discussion of
  576.                LESSEDIT in PROMPTS below).
  577.  
  578.           -N   Causes a line number to be displayed at the beginning
  579.                of each line in the display.
  580.  
  581.           -o_f_i_l_e_n_a_m_e
  582.                Causes _l_e_s_s to copy its input to the named file as it
  583.                is being viewed.  This applies only when the input file
  584.                is a pipe, not an ordinary file.  If the file already
  585.                exists, _l_e_s_s will ask for confirmation before
  586.                overwriting it.
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                                           (printed 3/9/94)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  599.  
  600.  
  601.  
  602.           -O_f_i_l_e_n_a_m_e
  603.                The -O option is like -o, but it will overwrite an
  604.                existing file without asking for confirmation.
  605.  
  606.                If no log file has been specified, the -o and -O
  607.                options can be used from within _l_e_s_s to specify a log
  608.                file.  Without a file name, they will simply report the
  609.                name of the log file.  The "s" command is equivalent to
  610.                specifying -o from within _l_e_s_s.
  611.  
  612.           -p_p_a_t_t_e_r_n
  613.                The -p option on the command line is equivalent to
  614.                specifying +/_p_a_t_t_e_r_n; that is, it tells _l_e_s_s to start
  615.                at the first occurence of _p_a_t_t_e_r_n in the file.
  616.  
  617.           -P_p_r_o_m_p_t
  618.                Provides a way to tailor the three prompt styles to
  619.                your own preference.  This option would normally be put
  620.                in the LESS environment variable, rather than being
  621.                typed in with each _l_e_s_s command.  Such an option must
  622.                either be the last option in the LESS variable, or be
  623.                terminated by a dollar sign.  -P followed by a string
  624.                changes the default (short) prompt to that string.  -Pm
  625.                changes the medium (-m) prompt to the string, and -PM
  626.                changes the long (-M) prompt.  Also, -P= changes the
  627.                message printed by the = command to the given string.
  628.                All prompt strings consist of a sequence of letters and
  629.                special escape sequences.  See the section on PROMPTS
  630.                for more details.
  631.  
  632.           -q   Causes moderately "quiet" operation: the terminal bell
  633.                is not rung if an attempt is made to scroll past the
  634.                end of the file or before the beginning of the file.
  635.                If the terminal has a "visual bell", it is used
  636.                instead.  The bell will be rung on certain other
  637.                errors, such as typing an invalid character.  The
  638.                default is to ring the terminal bell in all such cases.
  639.  
  640.           -Q   Causes totally "quiet" operation: the terminal bell is
  641.                never rung.
  642.  
  643.           -r   Causes "raw" control characters to be displayed.  The
  644.                default is to display control characters using the
  645.                caret notation; for example, a control-A (octal 001) is
  646.                displayed as "^A".  Warning: when the -r flag is used,
  647.                _l_e_s_s cannot keep track of the actual appearance of the
  648.                screen (since this depends on how the screen responds
  649.                to each type of control character).  Thus, various
  650.                display problems may result, such as long lines being
  651.                split in the wrong place.
  652.  
  653.           -s   Causes consecutive blank lines to be squeezed into a
  654.  
  655.  
  656.  
  657.      Page 10                                          (printed 3/9/94)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  665.  
  666.  
  667.  
  668.                single blank line.  This is useful when viewing _n_r_o_f_f
  669.                output.
  670.  
  671.           -S   Causes lines longer than the screen width to be chopped
  672.                rather than folded.  That is, the remainder of a long
  673.                line is simply discarded.  The default is to fold long
  674.                lines; that is, display the remainder on the next line.
  675.  
  676.           -t_t_a_g
  677.                The -t option, followed immediately by a TAG, will edit
  678.                the file containing that tag.  For this to work, there
  679.                must be a file called "tags" in the current directory,
  680.                which was previously built by the _c_t_a_g_s (1) command.
  681.                This option may also be specified from within _l_e_s_s
  682.                (using the - command) as a way of examining a new file.
  683.                The command ":t" is equivalent to specifying -t from
  684.                within _l_e_s_s.
  685.  
  686.           -T_t_a_g_s_f_i_l_e
  687.                Specifies a tags file to be used instead of "tags".
  688.  
  689.           -u   Causes backspaces and carriage returns to be treated as
  690.                printable characters; that is, they are sent to the
  691.                terminal when they appear in the input.
  692.  
  693.           -U   Causes backspaces and carriage returns to be treated as
  694.                control characters; that is, they are handled as
  695.                specified by the -r option.
  696.  
  697.                By default, if neither -u nor -U is given, backspaces
  698.                which appear adjacent to an underscore character are
  699.                treated specially: the underlined text is displayed
  700.                using the terminal's hardware underlining capability.
  701.                Also, backspaces which appear between two identical
  702.                characters are treated specially: the overstruck text
  703.                is printed using the terminal's hardware boldface
  704.                capability.  Other backspaces are deleted, along with
  705.                the preceding character.  Carriage returns immediately
  706.                followed by a newline are deleted.  Other carriage
  707.                returns are handled as specified by the -r option.
  708.  
  709.           -w   Causes blank lines to be used to represent lines past
  710.                the end of the file.  By default, a tilde character is
  711.                used.
  712.  
  713.           -x_n  Sets tab stops every _n positions.  The default for _n is
  714.                8.
  715.  
  716.           -y_n  Specifies a maximum number of lines to scroll forward.
  717.                If it is necessary to scroll forward more than _n lines,
  718.                the screen is repainted instead.  The -c or -C option
  719.                may be used to repaint from the top of the screen if
  720.  
  721.  
  722.  
  723.      Page 11                                          (printed 3/9/94)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  731.  
  732.  
  733.  
  734.                desired.  By default, any forward movement causes
  735.                scrolling.
  736.  
  737.           -[z]_n
  738.                Changes the default scrolling window size to _n lines.
  739.                The default is one screenful.  The z and w commands can
  740.                also be used to change the window size.  The "z" may be
  741.                omitted, as in "-_n" for compatibility with _m_o_r_e.
  742.  
  743.           +    If a command line option begins with ++++, the remainder
  744.                of that option is taken to be an initial command to
  745.                _l_e_s_s. For example, +G tells _l_e_s_s to start at the end of
  746.                the file rather than the beginning, and +/xyz tells it
  747.                to start at the first occurrence of "xyz" in the file.
  748.                As a special case, +<number> acts like +<number>g; that
  749.                is, it starts the display at the specified line number
  750.                (however, see the caveat under the "g" command above).
  751.                If the option starts with ++, the initial command
  752.                applies to every file being viewed, not just the first
  753.                one.  The + command described previously may also be
  754.                used to set (or change) an initial command for every
  755.                file.
  756.  
  757.  
  758.      KKKKEEEEYYYY BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
  759.           You may define your own _l_e_s_s commands by using the program
  760.           _l_e_s_s_k_e_y (1) to create a file called ".less" in your home
  761.           directory.  This file specifies a set of command keys and an
  762.           action associated with each key.  See the _l_e_s_s_k_e_y manual
  763.           page for more details.
  764.  
  765.  
  766.      NNNNAAAATTTTIIIIOOOONNNNAAAALLLL CCCCHHHHAAAARRRRAAAACCCCTTTTEEEERRRR SSSSEEEETTTTSSSS
  767.           There are three types of characters in the input file:
  768.  
  769.           normal characters
  770.                can be displayed directly to the screen.
  771.  
  772.           control characters
  773.                should not be displayed directly, but are expected to
  774.                be found in ordinary text files (such as backspace and
  775.                tab).
  776.  
  777.           binary characters
  778.                cannot be displayed directly and are not expected to be
  779.                found in text files.
  780.  
  781.           By default, _l_e_s_s uses the ASCII character set.  In the ASCII
  782.           character set, characters with values between 128 and 255
  783.           are treated as binary.  The LESSCHARSET environment variable
  784.           may be used to select another character set.  If it is set
  785.           to the value "latin1", the ISO 8859/1 character set is
  786.  
  787.  
  788.  
  789.      Page 12                                          (printed 3/9/94)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  797.  
  798.  
  799.  
  800.           assumed.  Latin-1 is the same as ASCII, except characters
  801.           between 128 and 255 are treated as normal characters.  The
  802.           only valid values for LESSCHARSET currently are "ascii" and
  803.           "latin1".
  804.  
  805.           In special cases, it may be desired to tailor _l_e_s_s to use a
  806.           character set other than the ones definable by LESSCHARSET.
  807.           In this case, the environment variable LESSCHARDEF can be
  808.           used to define a character set.  It should be set to a
  809.           string where each character in the string represents one
  810.           character in the character set.  The character "." is used
  811.           for a normal character, "c" for control, and "b" for binary.
  812.           A decimal number may be used for repetition.  For example,
  813.           "bccc4b." would mean character 0 is binary, 1, 2 and 3 are
  814.           control, 4, 5, 6 and 7 are binary, and 8 is normal.  All
  815.           characters after the last are taken to be the same as the
  816.           last, so characters 9 through 255 would be normal.  (This is
  817.           an example, and does not necessarily represent any real
  818.           character set.)
  819.  
  820.           Setting LESSCHARDEF to "8bcccbcc18b95.b" is the same as
  821.           setting LESSCHARSET to "ascii".  Setting LESSCHARDEF to
  822.           "8bcccbcc18b95.33b." is the same as setting LESSCHARSET to
  823.           "latin1".
  824.  
  825.           Control and binary characters are displayed in blinking
  826.           mode.  Each such character is displayed in caret notation if
  827.           possible (e.g. ^A for control-A).  Caret notation is used
  828.           only if inverting the 0100 bit results in a normal printable
  829.           character.  Otherwise, the character is displayed as an
  830.           octal number preceded by a backslash.  This octal format can
  831.           be changed by setting the LESSBINFMT environment variable to
  832.           a printf-style format string; the default is '\%o'.  The
  833.           blinking mode display of control and binary characters can
  834.           be changed or disabled by preceding the LESSBINFMT format
  835.           string with a "*" and one character to select the mode: "*k"
  836.           is blinking, "*d" is bold, "*u" is underlined, and "*n" is
  837.           normal (no special display attribute).  For example, if
  838.           LESSBINFMT is "*u[%x]", binary characters are displayed in
  839.           underlined hexadecimal surrounded by brackets.
  840.  
  841.  
  842.      PPPPRRRROOOOMMMMPPPPTTTTSSSS
  843.           The -P option allows you to tailor the prompt to your
  844.           preference.  The string given to the -P option replaces the
  845.           specified prompt string.  Certain characters in the string
  846.           are interpreted specially.  The prompt mechanism is rather
  847.           complicated to provide flexibility, but the ordinary user
  848.           need not understand the details of constructing personalized
  849.           prompt strings.
  850.  
  851.           A percent sign followed by a single character is expanded
  852.  
  853.  
  854.  
  855.      Page 13                                          (printed 3/9/94)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  863.  
  864.  
  865.  
  866.           according to what the following character is:
  867.  
  868.           %b_X  Replaced by the byte offset into the current input
  869.                file.  The b is followed by a single character (shown
  870.                as _X above) which specifies the line whose byte offset
  871.                is to be used.  If the character is a "t", the byte
  872.                offset of the top line in the display is used, an "m"
  873.                means use the middle line, a "b" means use the bottom
  874.                line, a "B" means use the line just after the bottom
  875.                line, and a "j" means use the "target" line, as
  876.                specified by the -j option.
  877.  
  878.           %B   Replaced by the size of the current input file.
  879.  
  880.           %E   Replaced by the name of the editor (from the EDITOR
  881.                environment variable).  See the discussion of the
  882.                LESSEDIT feature below.
  883.  
  884.           %f   Replaced by the name of the current input file.
  885.  
  886.           %i   Replaced by the index of the current file in the list
  887.                of input files.
  888.  
  889.           %l_X  Replaced by the line number of a line in the input
  890.                file.  The line to be used is determined by the _X, as
  891.                with the %b option.
  892.  
  893.           %L   Replaced by the line number of the last line in the
  894.                input file.
  895.  
  896.           %m   Replaced by the total number of input files.
  897.  
  898.           %p_X  Replaced by the percent into the current input file.
  899.                The line used is determined by the _X as with the %b
  900.                option.
  901.  
  902.           %s   Same as %B.
  903.  
  904.           %t   Causes any trailing spaces to be removed.  Usually used
  905.                at the end of the string, but may appear anywhere.
  906.  
  907.           %x   Replaced by the name of the next input file in the
  908.                list.
  909.  
  910.           If any item is unknown (for example, the file size if input
  911.           is a pipe), a question mark is printed instead.
  912.  
  913.           The format of the prompt string can be changed depending on
  914.           certain conditions.  A question mark followed by a single
  915.           character acts like an "IF": depending on the following
  916.           character, a condition is evaluated.  If the condition is
  917.           true, any characters following the question mark and
  918.  
  919.  
  920.  
  921.      Page 14                                          (printed 3/9/94)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      LLLLEEEESSSSSSSS((((1111))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   LLLLEEEESSSSSSSS((((1111))))
  929.  
  930.  
  931.  
  932.           condition character, up to a period, are included in the
  933.           prompt.  If the condition is false, such characters are not
  934.           included.  A colon appearing between the question mark and
  935.           the period can be used to establish an "ELSE": any
  936.           characters between the col